<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .box{
        border:1px solid #000;
        overflow: hidden;
    }
    .item{
        float: left;
        width: 50%;
        height: 100px;
        border: 1px solid pink;
        box-sizing: border-box;
    }
    /* inline元素 */
    .box::after{
        content: '';
        display: block;
        clear: both;
    }
    </style>
</head>
<body>
    <div class="box">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>
</html>